package com.qf.mapper;

import com.qf.pojo.Categories;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

public interface CategoryMapper {

@Select("select * from categories where categoryid= #{cid} ")
    Categories selectCategoryById(Integer cid);

@Select("select * from categories")
    List<Categories> selectAllCategory();

 @Insert("insert into categories(categoryname) value(#{categoryName})")
    void  addcategory(@Param("categoryName") String categoryName);
}

